home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Game / B / Bolo 0.99.6.sit / Bolo / More information / Sample Code / BoloInfoPacket.c
MacBinary  |  1995-04-25  |  8.6 KB  |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Apr 25 01:33:51 1995, modified Tue Apr 25 01:33:51 1995, creator SimpleText, type ASCII, 8121 bytes "BoloInfoPacket.c" , at 0x2039 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 10 42 6f 6c 6f 49 6e | 66 6f 50 61 63 6b 65 74 |..BoloIn|foPacket|
|00000010| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 74 74 78 | 74 00 00 00 00 00 00 00 |.TEXTttx|t.......|
|00000050| 00 00 00 00 00 1f b9 00 | 00 01 ac ab c2 3a 3f ab |........|.....:?.|
|00000060| c2 3a 3f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.:?.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 77 82 00 00 |........|....w...|
|00000080| 2f 2a 20 53 61 6d 70 6c | 65 20 63 6f 64 65 20 74 |/* Sampl|e code t|
|00000090| 6f 20 61 63 63 65 73 73 | 20 42 6f 6c 6f 27 73 20 |o access| Bolo's |
|000000a0| 67 61 6d 65 20 69 6e 66 | 6f 6d 61 74 69 6f 6e 20 |game inf|omation |
|000000b0| 70 61 63 6b 65 74 20 69 | 6e 74 65 72 66 61 63 65 |packet i|nterface|
|000000c0| 20 2a 2f 0d 2f 2a 20 28 | 43 29 20 31 39 39 33 2d | */./* (|C) 1993-|
|000000d0| 31 39 39 35 20 53 74 75 | 61 72 74 20 43 68 65 73 |1995 Stu|art Ches|
|000000e0| 68 69 72 65 20 3c 63 68 | 65 73 68 69 72 65 40 63 |hire <ch|eshire@c|
|000000f0| 73 2e 73 74 61 6e 66 6f | 72 64 2e 65 64 75 3e 0d |s.stanfo|rd.edu>.|
|00000100| 2f 2a 20 55 6e 69 78 20 | 43 20 66 69 6c 65 20 2d |/* Unix |C file -|
|00000110| 2d 20 74 61 62 73 20 61 | 72 65 20 38 20 73 70 61 |- tabs a|re 8 spa|
|00000120| 63 65 73 20 2d 2d 20 63 | 6f 6d 70 69 6c 65 20 77 |ces -- c|ompile w|
|00000130| 69 74 68 20 67 63 63 20 | 66 6f 72 20 62 65 73 74 |ith gcc |for best|
|00000140| 20 72 65 73 75 6c 74 73 | 20 2a 2f 0d 2f 2a 20 72 | results| */./* r|
|00000150| 75 6e 20 77 69 74 68 20 | 22 61 2e 6f 75 74 20 3c |un with |"a.out <|
|00000160| 70 6f 72 74 2d 6e 75 6d | 62 65 72 3e 22 20 74 6f |port-num|ber>" to|
|00000170| 20 6c 69 73 74 65 6e 20 | 6f 6e 20 61 20 55 44 50 | listen |on a UDP|
|00000180| 20 70 6f 72 74 20 66 6f | 72 20 67 61 6d 65 73 20 | port fo|r games |
|00000190| 73 74 61 72 74 69 6e 67 | 20 2a 2f 0d 2f 2a 20 72 |starting| */./* r|
|000001a0| 75 6e 20 77 69 74 68 20 | 22 61 2e 6f 75 74 20 3c |un with |"a.out <|
|000001b0| 70 6f 72 74 2d 6e 75 6d | 62 65 72 3e 20 3c 68 6f |port-num|ber> <ho|
|000001c0| 73 74 6e 61 6d 65 3e 22 | 20 74 6f 20 70 69 6e 67 |stname>"| to ping|
|000001d0| 20 61 20 72 75 6e 6e 69 | 6e 67 20 42 6f 6c 6f 20 | a runni|ng Bolo |
|000001e0| 67 61 6d 65 20 61 6e 64 | 0d 20 20 20 74 68 65 6e |game and|. then|
|000001f0| 20 77 61 69 74 20 66 6f | 72 20 72 65 70 6c 69 65 | wait fo|r replie|
|00000200| 73 2e 20 2a 2f 0d 2f 2a | 20 72 75 6e 20 77 69 74 |s. */./*| run wit|
|00000210| 68 20 22 61 2e 6f 75 74 | 20 3c 70 6f 72 74 2d 6e |h "a.out| <port-n|
|00000220| 75 6d 62 65 72 3e 20 3c | 73 75 62 6e 65 74 2d 62 |umber> <|subnet-b|
|00000230| 72 6f 61 64 63 61 73 74 | 2d 61 64 64 72 65 73 73 |roadcast|-address|
|00000240| 3e 20 74 6f 20 6c 6f 63 | 61 74 65 20 41 4c 4c 0d |> to loc|ate ALL.|
|00000250| 20 20 20 42 6f 6c 6f 20 | 67 61 6d 65 73 20 72 75 | Bolo |games ru|
|00000260| 6e 6e 69 6e 67 20 77 69 | 74 68 69 6e 20 61 20 70 |nning wi|thin a p|
|00000270| 61 72 74 69 63 75 6c 61 | 72 20 49 50 20 62 72 6f |articula|r IP bro|
|00000280| 61 64 63 61 73 74 20 64 | 6f 6d 61 69 6e 2e 20 2a |adcast d|omain. *|
|00000290| 2f 0d 2f 2a 20 54 68 65 | 72 65 20 69 73 20 6e 6f |/./* The|re is no|
|000002a0| 20 72 65 6c 69 61 62 69 | 6c 69 74 79 20 68 65 72 | reliabi|lity her|
|000002b0| 65 20 2d 2d 20 74 68 69 | 73 20 69 73 20 6a 75 73 |e -- thi|s is jus|
|000002c0| 74 20 74 6f 20 69 6c 6c | 75 73 74 72 61 74 65 20 |t to ill|ustrate |
|000002d0| 68 6f 77 20 74 6f 20 73 | 65 6e 64 20 61 6e 64 0d |how to s|end and.|
|000002e0| 20 20 20 72 65 63 65 69 | 76 65 20 74 68 65 20 70 | recei|ve the p|
|000002f0| 61 63 6b 65 74 73 2e 20 | 59 6f 75 20 6d 61 79 20 |ackets. |You may |
|00000300| 77 69 73 68 20 74 6f 20 | 64 6f 20 72 65 74 72 61 |wish to |do retra|
|00000310| 6e 73 6d 69 73 73 69 6f | 6e 73 20 61 6e 64 20 74 |nsmissio|ns and t|
|00000320| 69 6d 65 6f 75 74 73 2e | 20 2a 2f 0d 0d 23 69 6e |imeouts.| */..#in|
|00000330| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 0d |clude <s|tdio.h>.|
|00000340| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 74 79 |#include| <sys/ty|
|00000350| 70 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |pes.h>.#|include |
|00000360| 3c 73 79 73 2f 73 6f 63 | 6b 65 74 2e 68 3e 0d 23 |<sys/soc|ket.h>.#|
|00000370| 69 6e 63 6c 75 64 65 20 | 3c 6e 65 74 69 6e 65 74 |include |<netinet|
|00000380| 2f 69 6e 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |/in.h>.#|include |
|00000390| 3c 6e 65 74 64 62 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<netdb.h|>.#inclu|
|000003a0| 64 65 20 3c 73 79 73 2f | 74 69 6d 65 2e 68 3e 0d |de <sys/|time.h>.|
|000003b0| 0d 2f 2a 20 42 6f 6c 6f | 20 75 73 65 73 20 6c 69 |./* Bolo| uses li|
|000003c0| 74 74 6c 65 2d 65 6e 64 | 69 61 6e 20 62 79 74 65 |ttle-end|ian byte|
|000003d0| 20 6f 72 64 65 72 69 6e | 67 20 2d 2d 20 6c 69 6b | orderin|g -- lik|
|000003e0| 65 20 74 68 65 20 42 42 | 43 20 6d 69 63 72 6f 27 |e the BB|C micro'|
|000003f0| 73 20 36 35 30 32 0d 70 | 72 6f 63 65 73 73 6f 72 |s 6502.p|rocessor|
|00000400| 2c 20 38 30 78 38 36 20 | 73 65 72 69 65 73 2c 20 |, 80x86 |series, |
|00000410| 41 63 6f 72 6e 20 52 69 | 73 6b 20 4d 61 63 68 69 |Acorn Ri|sk Machi|
|00000420| 6e 65 2c 20 61 6e 64 20 | 44 45 43 20 63 6f 6d 70 |ne, and |DEC comp|
|00000430| 75 74 65 72 73 2c 20 61 | 6e 64 0d 75 6e 6c 69 6b |uters, a|nd.unlik|
|00000440| 65 20 4d 61 63 73 20 61 | 6e 64 20 53 75 6e 73 2e |e Macs a|nd Suns.|
|00000450| 20 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | The fol|lowing m|
|00000460| 61 63 72 6f 20 73 68 6f | 75 6c 64 20 63 6f 6e 76 |acro sho|uld conv|
|00000470| 65 72 74 20 74 6f 20 61 | 6e 64 20 66 72 6f 6d 0d |ert to a|nd from.|
|00000480| 6c 6f 63 61 6c 20 62 79 | 74 65 20 6f 72 64 65 72 |local by|te order|
|00000490| 69 6e 67 20 6f 6e 20 61 | 6e 79 20 75 6e 69 78 20 |ing on a|ny unix |
|000004a0| 6d 61 63 68 69 6e 65 2e | 20 49 20 64 6f 6e 27 74 |machine.| I don't|
|000004b0| 20 6b 6e 6f 77 20 61 20 | 62 65 74 74 65 72 20 77 | know a |better w|
|000004c0| 61 79 20 74 6f 0d 64 6f | 20 69 74 2c 20 62 75 74 |ay to.do| it, but|
|000004d0| 20 61 20 67 6f 6f 64 20 | 63 6f 6d 70 69 6c 65 72 | a good |compiler|
|000004e0| 20 77 69 6c 6c 20 6f 70 | 74 69 6d 69 7a 65 20 69 | will op|timize i|
|000004f0| 74 20 6f 75 74 20 61 6e | 79 77 61 79 2e 20 2a 2f |t out an|yway. */|
|00000500| 0d 23 64 65 66 69 6e 65 | 20 6e 65 74 73 68 6f 72 |.#define| netshor|
|00000510| 74 28 58 29 20 28 68 74 | 6f 6e 73 28 58 29 20 3e |t(X) (ht|ons(X) >|
|00000520| 3e 20 38 20 7c 20 68 74 | 6f 6e 73 28 58 29 20 3c |> 8 | ht|ons(X) <|
|00000530| 3c 20 38 29 0d 0d 2f 2a | 20 4d 61 63 73 20 63 6f |< 8)../*| Macs co|
|00000540| 75 6e 74 20 74 69 6d 65 | 20 73 69 6e 63 65 20 4d |unt time| since M|
|00000550| 69 64 6e 69 67 68 74 2c | 20 31 73 74 20 4a 61 6e |idnight,| 1st Jan|
|00000560| 20 31 39 30 34 2e 20 55 | 6e 69 78 20 63 6f 75 6e | 1904. U|nix coun|
|00000570| 74 73 20 66 72 6f 6d 20 | 31 39 37 30 2e 0d 20 20 |ts from |1970.. |
|00000580| 20 54 68 69 73 20 76 61 | 6c 75 65 20 61 64 6a 75 | This va|lue adju|
|00000590| 73 74 73 20 66 6f 72 20 | 74 68 65 20 36 36 20 79 |sts for |the 66 y|
|000005a0| 65 61 72 73 20 61 6e 64 | 20 31 37 20 6c 65 61 70 |ears and| 17 leap|
|000005b0| 2d 64 61 79 73 20 64 69 | 66 66 65 72 65 6e 63 65 |-days di|fference|
|000005c0| 2e 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 54 49 4d |. */.#de|fine TIM|
|000005d0| 45 5f 41 44 4a 55 53 54 | 20 28 28 28 31 39 37 30 |E_ADJUST| (((1970|
|000005e0| 20 2d 20 31 39 30 34 29 | 20 2a 20 33 36 35 20 2b | - 1904)| * 365 +|
|000005f0| 20 31 37 29 20 2a 20 32 | 34 20 2a 20 36 30 20 2a | 17) * 2|4 * 60 *|
|00000600| 20 36 30 29 0d 0d 2f 2a | 20 41 6c 73 6f 20 6e 6f | 60)../*| Also no|
|00000610| 74 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |te the f|ollowing|
|00000620| 20 74 77 6f 20 62 75 67 | 73 20 69 6e 20 42 6f 6c | two bug|s in Bol|
|00000630| 6f 20 30 2e 39 39 2c 20 | 30 2e 39 39 2e 31 20 61 |o 0.99, |0.99.1 a|
|00000640| 6e 64 20 30 2e 39 39 2e | 32 3a 0d 0d 31 2e 20 54 |nd 0.99.|2:..1. T|
|00000650| 68 65 20 47 61 6d 65 49 | 44 20 77 61 73 20 69 6e |he GameI|D was in|
|00000660| 74 65 6e 64 65 64 20 74 | 6f 20 62 65 20 73 69 6d |tended t|o be sim|
|00000670| 70 6c 79 20 61 6e 20 6f | 70 61 71 75 65 20 69 64 |ply an o|paque id|
|00000680| 65 6e 74 69 66 69 65 72 | 20 74 6f 0d 64 69 73 74 |entifier| to.dist|
|00000690| 69 6e 67 75 69 73 68 20 | 67 61 6d 65 73 2e 20 48 |inguish |games. H|
|000006a0| 65 6e 63 65 20 49 20 64 | 69 64 20 6e 6f 74 20 6d |ence I d|id not m|
|000006b0| 61 6b 65 20 42 6f 6c 6f | 20 70 75 74 20 74 68 65 |ake Bolo| put the|
|000006c0| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 69 6e 0d 63 | compone|nts in.c|
|000006d0| 61 6e 6f 6e 69 63 61 6c | 20 6e 65 74 77 6f 72 6b |anonical| network|
|000006e0| 20 62 79 74 65 20 6f 72 | 64 65 72 2c 20 73 69 6e | byte or|der, sin|
|000006f0| 63 65 20 49 44 73 20 77 | 65 72 65 20 6e 6f 74 20 |ce IDs w|ere not |
|00000700| 73 75 70 70 6f 73 65 64 | 20 74 6f 20 62 65 0d 64 |supposed| to be.d|
|00000710| 69 73 61 73 73 65 6d 62 | 6c 65 64 2c 20 62 75 74 |isassemb|led, but|
|00000720| 20 6a 75 73 74 20 63 6f | 6d 70 61 72 65 64 20 66 | just co|mpared f|
|00000730| 6f 72 20 65 71 75 61 6c | 69 74 79 20 6f 72 20 69 |or equal|ity or i|
|00000740| 6e 65 71 75 61 6c 69 74 | 79 2e 20 48 6f 77 65 76 |nequalit|y. Howev|
|00000750| 65 72 2c 20 49 0d 63 68 | 61 6e 67 65 64 20 6d 79 |er, I.ch|anged my|
|00000760| 20 6d 69 6e 64 20 61 6e | 64 20 64 65 63 69 64 65 | mind an|d decide|
|00000770| 64 20 74 68 61 74 20 69 | 74 20 69 73 20 75 73 65 |d that i|t is use|
|00000780| 66 75 6c 20 28 6f 72 20 | 61 74 20 6c 65 61 73 74 |ful (or |at least|
|00000790| 20 69 6e 74 65 72 65 73 | 74 69 6e 67 29 0d 74 6f | interes|ting).to|
|000007a0| 20 6b 6e 6f 77 20 77 68 | 65 6e 20 61 6e 64 20 77 | know wh|en and w|
|000007b0| 68 65 72 65 20 61 20 67 | 61 6d 65 20 73 74 61 72 |here a g|ame star|
|000007c0| 74 65 64 2e 20 53 6f 2c | 20 66 6f 72 20 6e 6f 77 |ted. So,| for now|
|000007d0| 2c 20 74 68 65 20 67 61 | 6d 65 20 74 69 6d 65 73 |, the ga|me times|
|000007e0| 74 61 6d 70 20 69 73 0d | 69 6e 20 74 68 65 20 77 |tamp is.|in the w|
|000007f0| 72 6f 6e 67 20 62 79 74 | 65 20 6f 72 64 65 72 2e |rong byt|e order.|
|00000800| 20 54 68 69 73 20 77 69 | 6c 6c 20 62 65 20 66 69 | This wi|ll be fi|
|00000810| 78 65 64 20 69 6e 20 61 | 20 66 75 74 75 72 65 20 |xed in a| future |
|00000820| 76 65 72 73 69 6f 6e 20 | 6f 66 20 42 6f 6c 6f 2e |version |of Bolo.|
|00000830| 0d 0d 32 2e 20 54 68 65 | 20 4d 61 63 20 73 79 73 |..2. The| Mac sys|
|00000840| 74 65 6d 20 63 61 6c 6c | 20 22 47 65 74 44 61 74 |tem call| "GetDat|
|00000850| 65 54 69 6d 65 22 20 72 | 65 74 75 72 6e 73 20 74 |eTime" r|eturns t|
|00000860| 68 65 20 74 69 6d 65 20 | 69 6e 20 4c 4f 43 41 4c |he time |in LOCAL|
|00000870| 20 74 69 6d 65 2c 0d 6e | 6f 74 20 47 4d 54 2e 20 | time,.n|ot GMT. |
|00000880| 42 6f 6c 6f 20 6e 65 67 | 6c 65 63 74 73 20 74 6f |Bolo neg|lects to|
|00000890| 20 63 6f 6e 76 65 72 74 | 20 74 68 69 73 20 74 69 | convert| this ti|
|000008a0| 6d 65 20 74 6f 20 47 4d | 54 20 62 65 66 6f 72 65 |me to GM|T before|
|000008b0| 20 73 65 6e 64 69 6e 67 | 20 69 74 0d 6f 76 65 72 | sending| it.over|
|000008c0| 20 74 68 65 20 6e 65 74 | 77 6f 72 6b 2c 20 72 65 | the net|work, re|
|000008d0| 73 75 6c 74 69 6e 67 20 | 69 6e 20 74 68 65 20 67 |sulting |in the g|
|000008e0| 61 6d 65 20 73 74 61 72 | 74 20 74 69 6d 65 20 62 |ame star|t time b|
|000008f0| 65 69 6e 67 20 67 69 76 | 65 6e 20 69 6e 20 6c 6f |eing giv|en in lo|
|00000900| 63 61 6c 0d 74 69 6d 65 | 20 66 6f 72 20 74 68 65 |cal.time| for the|
|00000910| 20 4d 61 63 20 74 68 61 | 74 20 73 74 61 72 74 65 | Mac tha|t starte|
|00000920| 64 20 69 74 2e 20 54 68 | 65 72 65 20 69 73 20 6e |d it. Th|ere is n|
|00000930| 6f 20 77 61 79 20 61 74 | 20 70 72 65 73 65 6e 74 |o way at| present|
|00000940| 20 74 6f 20 63 6f 6e 76 | 65 72 74 0d 74 68 69 73 | to conv|ert.this|
|00000950| 20 74 69 6d 65 20 74 6f | 20 61 20 72 65 61 6c 20 | time to| a real |
|00000960| 74 69 6d 65 2c 20 65 78 | 63 65 70 74 20 69 66 20 |time, ex|cept if |
|00000970| 79 6f 75 20 68 61 70 70 | 65 6e 20 74 6f 20 6b 6e |you happ|en to kn|
|00000980| 6f 77 20 77 68 61 74 20 | 74 69 6d 65 20 7a 6f 6e |ow what |time zon|
|00000990| 65 0d 74 68 65 20 6f 66 | 66 65 6e 64 69 6e 67 20 |e.the of|fending |
|000009a0| 4d 61 63 20 69 73 20 69 | 6e 2e 20 54 68 69 73 20 |Mac is i|n. This |
|000009b0| 77 69 6c 6c 20 62 65 20 | 66 69 78 65 64 20 69 6e |will be |fixed in|
|000009c0| 20 61 20 66 75 74 75 72 | 65 20 76 65 72 73 69 6f | a futur|e versio|
|000009d0| 6e 20 6f 66 20 42 6f 6c | 6f 2e 20 2a 2f 0d 0d 2f |n of Bol|o. */../|
|000009e0| 2a 20 42 6f 6c 6f 20 30 | 2e 39 39 2e 33 20 61 6e |* Bolo 0|.99.3 an|
|000009f0| 64 20 30 2e 39 39 2e 34 | 20 77 65 72 65 20 6e 6f |d 0.99.4| were no|
|00000a00| 74 20 70 75 62 6c 69 63 | 6c 79 20 72 65 6c 65 61 |t public|ly relea|
|00000a10| 73 65 64 20 2a 2f 0d 2f | 2a 20 42 6f 6c 6f 20 30 |sed */./|* Bolo 0|
|00000a20| 2e 39 39 2e 35 20 66 69 | 78 65 73 20 74 68 65 20 |.99.5 fi|xes the |
|00000a30| 47 4d 54 20 70 72 6f 62 | 6c 65 6d 20 62 75 74 20 |GMT prob|lem but |
|00000a40| 6e 6f 74 20 74 68 65 20 | 62 79 74 65 20 6f 72 64 |not the |byte ord|
|00000a50| 65 72 69 6e 67 2e 20 54 | 68 69 73 0d 64 65 63 69 |ering. T|his.deci|
|00000a60| 73 69 6f 6e 20 77 61 73 | 20 6d 61 64 65 20 73 6f |sion was| made so|
|00000a70| 20 61 73 20 6e 6f 74 20 | 74 6f 20 62 72 65 61 6b | as not |to break|
|00000a80| 20 74 68 65 20 65 78 69 | 73 74 69 6e 67 20 62 6f | the exi|sting bo|
|00000a90| 6c 6f 20 74 72 61 63 6b | 65 72 20 63 6f 64 65 2e |lo track|er code.|
|00000aa0| 0d 57 68 65 6e 20 61 20 | 66 75 74 75 72 65 20 76 |.When a |future v|
|00000ab0| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 65 20 42 6f |ersion o|f the Bo|
|00000ac0| 6c 6f 20 49 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 69 |lo Infor|mation i|
|00000ad0| 6e 74 65 72 66 61 63 65 | 20 69 73 20 64 65 73 69 |nterface| is desi|
|00000ae0| 67 6e 65 64 0d 74 68 65 | 20 62 79 74 65 20 6f 72 |gned.the| byte or|
|00000af0| 64 65 72 69 6e 67 20 28 | 61 6e 64 20 6d 61 6e 79 |dering (|and many|
|00000b00| 20 6f 74 68 65 72 20 74 | 68 69 6e 67 73 29 20 77 | other t|hings) w|
|00000b10| 69 6c 6c 20 62 65 20 63 | 6f 72 72 65 63 74 65 64 |ill be c|orrected|
|00000b20| 2e 20 2a 2f 0d 0d 2f 2a | 20 43 6f 6e 76 65 72 74 |. */../*| Convert|
|00000b30| 20 42 6f 6c 6f 27 73 20 | 70 61 73 63 61 6c 20 73 | Bolo's |pascal s|
|00000b40| 74 72 69 6e 67 20 74 6f | 20 43 20 73 74 72 69 6e |tring to| C strin|
|00000b50| 67 20 73 6f 20 77 65 20 | 63 61 6e 20 77 6f 72 6b |g so we |can work|
|00000b60| 20 77 69 74 68 20 69 74 | 20 65 61 73 69 6c 79 20 | with it| easily |
|00000b70| 2a 2f 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 50 |*/.stati|c void P|
|00000b80| 74 6f 43 53 74 72 28 75 | 6e 73 69 67 6e 65 64 20 |toCStr(u|nsigned |
|00000b90| 63 68 61 72 20 2a 73 74 | 72 69 6e 67 29 0d 09 7b |char *st|ring)..{|
|00000ba0| 0d 09 69 6e 74 20 69 2c | 20 6c 65 6e 20 3d 20 73 |..int i,| len = s|
|00000bb0| 74 72 69 6e 67 5b 30 5d | 3b 0d 09 66 6f 72 20 28 |tring[0]|;..for (|
|00000bc0| 69 3d 30 3b 20 69 3c 6c | 65 6e 3b 20 69 2b 2b 29 |i=0; i<l|en; i++)|
|00000bd0| 20 73 74 72 69 6e 67 5b | 69 5d 20 3d 20 73 74 72 | string[|i] = str|
|00000be0| 69 6e 67 5b 69 2b 31 5d | 3b 0d 09 73 74 72 69 6e |ing[i+1]|;..strin|
|00000bf0| 67 5b 6c 65 6e 5d 20 3d | 20 30 3b 0d 09 7d 0d 0d |g[len] =| 0;..}..|
|00000c00| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 7b |typedef |struct {|
|00000c10| 20 75 5f 63 68 61 72 20 | 63 5b 33 36 5d 3b 20 7d | u_char |c[36]; }|
|00000c20| 20 75 5f 63 68 61 72 33 | 36 3b 0d 74 79 70 65 64 | u_char3|6;.typed|
|00000c30| 65 66 20 75 5f 63 68 61 | 72 20 20 42 59 54 45 3b |ef u_cha|r BYTE;|
|00000c40| 0d 74 79 70 65 64 65 66 | 20 75 5f 73 68 6f 72 74 |.typedef| u_short|
|00000c50| 20 57 4f 52 44 3b 0d 0d | 23 64 65 66 69 6e 65 20 | WORD;..|#define |
|00000c60| 42 6f 6c 6f 56 65 72 73 | 69 6f 6e 5f 4d 61 6a 6f |BoloVers|ion_Majo|
|00000c70| 72 20 20 20 20 30 78 30 | 30 0d 23 64 65 66 69 6e |r 0x0|0.#defin|
|00000c80| 65 20 42 6f 6c 6f 56 65 | 72 73 69 6f 6e 5f 4d 69 |e BoloVe|rsion_Mi|
|00000c90| 6e 6f 72 20 20 20 20 30 | 78 39 39 0d 23 64 65 66 |nor 0|x99.#def|
|00000ca0| 69 6e 65 20 42 6f 6c 6f | 56 65 72 73 69 6f 6e 5f |ine Bolo|Version_|
|00000cb0| 52 65 76 69 73 69 6f 6e | 20 30 78 30 35 0d 0d 23 |Revision| 0x05..#|
|00000cc0| 64 65 66 69 6e 65 20 42 | 6f 6c 6f 50 61 63 6b 65 |define B|oloPacke|
|00000cd0| 74 5f 52 65 71 75 65 73 | 74 20 20 20 31 33 0d 23 |t_Reques|t 13.#|
|00000ce0| 64 65 66 69 6e 65 20 42 | 6f 6c 6f 50 61 63 6b 65 |define B|oloPacke|
|00000cf0| 74 5f 52 65 73 70 6f 6e | 73 65 20 20 31 34 0d 0d |t_Respon|se 14..|
|00000d00| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 0d 09 |typedef |struct..|
|00000d10| 7b 0d 09 42 59 54 45 20 | 73 69 67 6e 61 74 75 72 |{..BYTE |signatur|
|00000d20| 65 5b 34 5d 3b 09 2f 2a | 20 27 42 6f 6c 6f 27 20 |e[4];./*| 'Bolo' |
|00000d30| 2a 2f 0d 09 42 59 54 45 | 20 76 65 72 73 69 6f 6e |*/..BYTE| version|
|00000d40| 4d 61 6a 6f 72 3b 09 2f | 2a 20 30 78 30 30 20 20 |Major;./|* 0x00 |
|00000d50| 20 2a 2f 0d 09 42 59 54 | 45 20 76 65 72 73 69 6f | */..BYT|E versio|
|00000d60| 6e 4d 69 6e 6f 72 3b 09 | 2f 2a 20 30 78 39 39 20 |nMinor;.|/* 0x99 |
|00000d70| 20 20 2a 2f 0d 09 42 59 | 54 45 20 76 65 72 73 69 | */..BY|TE versi|
|00000d80| 6f 6e 52 65 76 69 73 69 | 6f 6e 3b 09 2f 2a 20 30 |onRevisi|on;./* 0|
|00000d90| 78 30 35 20 20 20 2a 2f | 0d 09 42 59 54 45 20 74 |x05 */|..BYTE t|
|00000da0| 79 70 65 3b 09 09 2f 2a | 20 31 33 20 66 6f 72 20 |ype;../*| 13 for |
|00000db0| 72 65 71 75 65 73 74 2c | 20 31 34 20 66 6f 72 20 |request,| 14 for |
|00000dc0| 72 65 73 70 6f 6e 73 65 | 20 2a 2f 0d 09 7d 20 42 |response| */..} B|
|00000dd0| 4f 4c 4f 48 45 41 44 45 | 52 3b 0d 0d 74 79 70 65 |OLOHEADE|R;..type|
|00000de0| 64 65 66 20 73 74 72 75 | 63 74 0d 09 7b 0d 09 73 |def stru|ct..{..s|
|00000df0| 74 72 75 63 74 20 69 6e | 5f 61 64 64 72 20 66 69 |truct in|_addr fi|
|00000e00| 72 73 74 6d 61 63 68 69 | 6e 65 3b 0d 09 75 5f 6c |rstmachi|ne;..u_l|
|00000e10| 6f 6e 67 20 73 74 61 72 | 74 5f 74 69 6d 65 3b 0d |ong star|t_time;.|
|00000e20| 09 7d 20 47 41 4d 45 49 | 44 3b 0d 0d 74 79 70 65 |.} GAMEI|D;..type|
|00000e30| 64 65 66 20 73 74 72 75 | 63 74 0d 09 7b 0d 09 42 |def stru|ct..{..B|
|00000e40| 4f 4c 4f 48 45 41 44 45 | 52 20 68 3b 0d 0d 09 75 |OLOHEADE|R h;...u|
|00000e50| 5f 63 68 61 72 33 36 20 | 6d 61 70 6e 61 6d 65 3b |_char36 |mapname;|
|00000e60| 20 20 20 20 2f 2a 20 50 | 61 73 63 61 6c 20 73 74 | /* P|ascal st|
|00000e70| 72 69 6e 67 20 28 66 69 | 72 73 74 20 62 79 74 65 |ring (fi|rst byte|
|00000e80| 20 69 73 20 6c 65 6e 67 | 74 68 29 20 20 20 20 20 | is leng|th) |
|00000e90| 20 20 20 20 2a 2f 0d 09 | 47 41 4d 45 49 44 20 67 | */..|GAMEID g|
|00000ea0| 61 6d 65 69 64 3b 09 20 | 20 20 20 20 2f 2a 20 38 |ameid;. | /* 8|
|00000eb0| 20 62 79 74 65 20 75 6e | 69 71 75 65 20 49 44 20 | byte un|ique ID |
|00000ec0| 66 6f 72 20 67 61 6d 65 | 20 28 63 6f 6d 62 69 6e |for game| (combin|
|00000ed0| 61 74 69 6f 6e 20 20 20 | 20 20 20 20 2a 2f 0d 09 |ation | */..|
|00000ee0| 09 09 20 20 20 20 20 2f | 2a 20 6f 66 20 73 74 61 |.. /|* of sta|
|00000ef0| 72 74 69 6e 67 20 6d 61 | 63 68 69 6e 65 20 61 64 |rting ma|chine ad|
|00000f00| 64 72 65 73 73 20 26 20 | 74 69 6d 65 73 74 61 6d |dress & |timestam|
|00000f10| 70 29 20 20 20 20 20 2a | 2f 0d 09 42 59 54 45 20 |p) *|/..BYTE |
|00000f20| 67 61 6d 65 74 79 70 65 | 3b 09 20 20 20 20 20 2f |gametype|;. /|
|00000f30| 2a 20 47 61 6d 65 20 74 | 79 70 65 20 28 31 2c 20 |* Game t|ype (1, |
|00000f40| 32 20 6f 72 20 33 3a 20 | 6f 70 65 6e 2c 20 74 6f |2 or 3: |open, to|
|00000f50| 75 72 6e 2e 20 26 20 73 | 74 72 69 63 74 29 20 2a |urn. & s|trict) *|
|00000f60| 2f 0d 09 42 59 54 45 20 | 61 6c 6c 6f 77 5f 6d 69 |/..BYTE |allow_mi|
|00000f70| 6e 65 73 3b 20 20 20 20 | 2f 2a 20 30 78 38 30 20 |nes; |/* 0x80 |
|00000f80| 66 6f 72 20 6e 6f 72 6d | 61 6c 20 68 69 64 64 65 |for norm|al hidde|
|00000f90| 6e 20 6d 69 6e 65 73 20 | 20 20 20 20 20 20 20 20 |n mines | |
|00000fa0| 20 20 20 20 20 20 20 20 | 2a 2f 0d 09 09 09 20 20 | |*/.... |
|00000fb0| 20 20 20 2f 2a 20 30 78 | 43 30 20 66 6f 72 20 61 | /* 0x|C0 for a|
|00000fc0| 6c 6c 20 6d 69 6e 65 73 | 20 76 69 73 69 62 6c 65 |ll mines| visible|
|00000fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fe0| 20 20 20 2a 2f 0d 09 42 | 59 54 45 20 61 6c 6c 6f | */..B|YTE allo|
|00000ff0| 77 5f 41 49 3b 09 20 20 | 20 20 20 2f 2a 20 30 20 |w_AI;. | /* 0 |
|00001000| 66 6f 72 20 6e 6f 20 41 | 49 20 74 61 6e 6b 73 2c |for no A|I tanks,|
|00001010| 20 31 20 66 6f 72 20 41 | 49 20 74 61 6e 6b 73 20 | 1 for A|I tanks |
|00001020| 61 6c 6c 6f 77 65 64 20 | 20 20 20 2a 2f 0d 09 42 |allowed | */..B|
|00001030| 59 54 45 20 73 70 61 72 | 65 31 3b 09 20 20 20 20 |YTE spar|e1;. |
|00001040| 20 2f 2a 20 30 20 20 20 | 20 20 20 20 20 20 20 20 | /* 0 | |
|00001050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001070| 20 2a 2f 0d 09 6c 6f 6e | 67 20 73 74 61 72 74 5f | */..lon|g start_|
|00001080| 64 65 6c 61 79 3b 20 20 | 20 20 2f 2a 20 69 66 20 |delay; | /* if |
|00001090| 6e 6f 6e 20 7a 65 72 6f | 2c 20 74 69 6d 65 20 75 |non zero|, time u|
|000010a0| 6e 74 69 6c 20 67 61 6d | 65 20 73 74 61 72 74 73 |ntil gam|e starts|
|000010b0| 2c 20 28 35 30 74 68 73 | 29 20 2a 2f 0d 09 6c 6f |, (50ths|) */..lo|
|000010c0| 6e 67 20 74 69 6d 65 5f | 6c 69 6d 69 74 3b 20 20 |ng time_|limit; |
|000010d0| 20 20 20 2f 2a 20 69 66 | 20 6e 6f 6e 20 7a 65 72 | /* if| non zer|
|000010e0| 6f 2c 20 74 69 6d 65 20 | 75 6e 74 69 6c 20 67 61 |o, time |until ga|
|000010f0| 6d 65 20 65 6e 64 73 2c | 20 28 35 30 74 68 73 29 |me ends,| (50ths)|
|00001100| 20 20 20 2a 2f 0d 0d 09 | 57 4f 52 44 20 6e 75 6d | */...|WORD num|
|00001110| 5f 70 6c 61 79 65 72 73 | 3b 20 20 20 20 2f 2a 20 |_players|; /* |
|00001120| 6e 75 6d 62 65 72 20 6f | 66 20 70 6c 61 79 65 72 |number o|f player|
|00001130| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | |
|00001140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2a 2f 0d | | */.|
|00001150| 09 57 4f 52 44 20 66 72 | 65 65 5f 70 69 6c 6c 73 |.WORD fr|ee_pills|
|00001160| 3b 20 20 20 20 20 2f 2a | 20 6e 75 6d 62 65 72 20 |; /*| number |
|00001170| 6f 66 20 66 72 65 65 20 | 28 6e 65 75 74 72 61 6c |of free |(neutral|
|00001180| 29 20 70 69 6c 6c 62 6f | 78 65 73 20 20 20 20 20 |) pillbo|xes |
|00001190| 20 20 20 20 20 20 2a 2f | 0d 09 57 4f 52 44 20 66 | */|..WORD f|
|000011a0| 72 65 65 5f 62 61 73 65 | 73 3b 20 20 20 20 20 2f |ree_base|s; /|
|000011b0| 2a 20 6e 75 6d 62 65 72 | 20 6f 66 20 66 72 65 65 |* number| of free|
|000011c0| 20 28 6e 65 75 74 72 61 | 6c 29 20 72 65 66 75 65 | (neutra|l) refue|
|000011d0| 6c 6c 69 6e 67 20 62 61 | 73 65 73 20 20 20 20 2a |lling ba|ses *|
|000011e0| 2f 0d 09 42 59 54 45 20 | 68 61 73 5f 70 61 73 73 |/..BYTE |has_pass|
|000011f0| 77 6f 72 64 3b 20 20 20 | 2f 2a 20 6e 6f 6e 2d 7a |word; |/* non-z|
|00001200| 65 72 6f 20 69 66 20 67 | 61 6d 65 20 68 61 73 20 |ero if g|ame has |
|00001210| 70 61 73 73 77 6f 72 64 | 20 73 65 74 20 20 20 20 |password| set |
|00001220| 20 20 20 20 20 20 20 20 | 2a 2f 0d 09 42 59 54 45 | |*/..BYTE|
|00001230| 20 73 70 61 72 65 32 3b | 09 20 20 20 20 20 2f 2a | spare2;|. /*|
|00001240| 20 30 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 0 | |
|00001250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2f | | */|
|00001270| 0d 09 7d 20 49 4e 46 4f | 5f 50 41 43 4b 45 54 3b |..} INFO|_PACKET;|
|00001280| 0d 0d 73 74 61 74 69 63 | 20 76 6f 69 64 20 73 65 |..static| void se|
|00001290| 6e 64 71 75 65 72 79 28 | 69 6e 74 20 73 2c 20 63 |ndquery(|int s, c|
|000012a0| 68 61 72 20 2a 2a 61 72 | 67 76 29 0d 09 7b 0d 09 |har **ar|gv)..{..|
|000012b0| 73 74 61 74 69 63 20 63 | 6f 6e 73 74 20 42 4f 4c |static c|onst BOL|
|000012c0| 4f 48 45 41 44 45 52 20 | 68 20 3d 0d 09 09 7b 0d |OHEADER |h =...{.|
|000012d0| 09 09 7b 20 22 42 6f 6c | 6f 22 20 7d 2c 0d 09 09 |..{ "Bol|o" },...|
|000012e0| 42 6f 6c 6f 56 65 72 73 | 69 6f 6e 5f 4d 61 6a 6f |BoloVers|ion_Majo|
|000012f0| 72 2c 0d 09 09 42 6f 6c | 6f 56 65 72 73 69 6f 6e |r,...Bol|oVersion|
|00001300| 5f 4d 69 6e 6f 72 2c 0d | 09 09 42 6f 6c 6f 56 65 |_Minor,.|..BoloVe|
|00001310| 72 73 69 6f 6e 5f 52 65 | 76 69 73 69 6f 6e 2c 0d |rsion_Re|vision,.|
|00001320| 09 09 42 6f 6c 6f 50 61 | 63 6b 65 74 5f 52 65 71 |..BoloPa|cket_Req|
|00001330| 75 65 73 74 0d 09 09 7d | 3b 0d 09 73 74 72 75 63 |uest...}|;..struc|
|00001340| 74 20 73 6f 63 6b 61 64 | 64 72 5f 69 6e 20 72 6d |t sockad|dr_in rm|
|00001350| 74 61 64 64 72 3b 0d 09 | 72 6d 74 61 64 64 72 2e |taddr;..|rmtaddr.|
|00001360| 73 69 6e 5f 66 61 6d 69 | 6c 79 20 20 20 20 20 20 |sin_fami|ly |
|00001370| 3d 20 41 46 5f 49 4e 45 | 54 3b 0d 09 72 6d 74 61 |= AF_INE|T;..rmta|
|00001380| 64 64 72 2e 73 69 6e 5f | 70 6f 72 74 20 20 20 20 |ddr.sin_|port |
|00001390| 20 20 20 20 3d 20 68 74 | 6f 6e 73 28 61 74 6f 69 | = ht|ons(atoi|
|000013a0| 28 61 72 67 76 5b 31 5d | 29 29 3b 0d 09 72 6d 74 |(argv[1]|));..rmt|
|000013b0| 61 64 64 72 2e 73 69 6e | 5f 61 64 64 72 2e 73 5f |addr.sin|_addr.s_|
|000013c0| 61 64 64 72 20 3d 20 69 | 6e 65 74 5f 61 64 64 72 |addr = i|net_addr|
|000013d0| 28 61 72 67 76 5b 32 5d | 29 3b 0d 09 69 66 20 28 |(argv[2]|);..if (|
|000013e0| 72 6d 74 61 64 64 72 2e | 73 69 6e 5f 61 64 64 72 |rmtaddr.|sin_addr|
|000013f0| 2e 73 5f 61 64 64 72 20 | 3d 3d 20 2d 31 29 0d 09 |.s_addr |== -1)..|
|00001400| 09 7b 0d 09 20 20 20 09 | 73 74 72 75 63 74 20 68 |.{.. .|struct h|
|00001410| 6f 73 74 65 6e 74 20 2a | 68 70 20 3d 20 67 65 74 |ostent *|hp = get|
|00001420| 68 6f 73 74 62 79 6e 61 | 6d 65 28 61 72 67 76 5b |hostbyna|me(argv[|
|00001430| 32 5d 29 3b 0d 09 20 20 | 20 09 69 66 20 28 21 68 |2]);.. | .if (!h|
|00001440| 70 29 20 7b 20 66 70 72 | 69 6e 74 66 28 73 74 64 |p) { fpr|intf(std|
|00001450| 65 72 72 2c 20 22 25 73 | 3a 20 75 6e 6b 6e 6f 77 |err, "%s|: unknow|
|00001460| 6e 20 68 6f 73 74 5c 6e | 22 2c 20 61 72 67 76 5b |n host\n|", argv[|
|00001470| 32 5d 29 3b 20 65 78 69 | 74 28 31 29 3b 20 7d 0d |2]); exi|t(1); }.|
|00001480| 09 20 20 20 09 72 6d 74 | 61 64 64 72 2e 73 69 6e |. .rmt|addr.sin|
|00001490| 5f 66 61 6d 69 6c 79 20 | 3d 20 68 70 2d 3e 68 5f |_family |= hp->h_|
|000014a0| 61 64 64 72 74 79 70 65 | 3b 0d 09 20 20 20 09 62 |addrtype|;.. .b|
|000014b0| 63 6f 70 79 28 68 70 2d | 3e 68 5f 61 64 64 72 2c |copy(hp-|>h_addr,|
|000014c0| 20 28 63 68 61 72 20 2a | 29 20 26 72 6d 74 61 64 | (char *|) &rmtad|
|000014d0| 64 72 2e 73 69 6e 5f 61 | 64 64 72 2c 20 68 70 2d |dr.sin_a|ddr, hp-|
|000014e0| 3e 68 5f 6c 65 6e 67 74 | 68 29 3b 0d 09 09 7d 0d |>h_lengt|h);...}.|
|000014f0| 0d 20 20 20 20 20 20 20 | 09 73 65 6e 64 74 6f 28 |. |.sendto(|
|00001500| 73 2c 20 26 68 2c 20 73 | 69 7a 65 6f 66 28 68 29 |s, &h, s|izeof(h)|
|00001510| 2c 20 30 2c 20 28 73 74 | 72 75 63 74 20 73 6f 63 |, 0, (st|ruct soc|
|00001520| 6b 61 64 64 72 20 2a 29 | 26 72 6d 74 61 64 64 72 |kaddr *)|&rmtaddr|
|00001530| 2c 20 73 69 7a 65 6f 66 | 28 72 6d 74 61 64 64 72 |, sizeof|(rmtaddr|
|00001540| 29 29 3b 0d 09 7d 0d 0d | 73 74 61 74 69 63 20 76 |));..}..|static v|
|00001550| 6f 69 64 20 70 72 69 6e | 74 69 70 28 73 74 72 75 |oid prin|tip(stru|
|00001560| 63 74 20 69 6e 5f 61 64 | 64 72 20 61 64 64 72 65 |ct in_ad|dr addre|
|00001570| 73 73 29 0d 09 7b 0d 09 | 75 6e 69 6f 6e 20 7b 20 |ss)..{..|union { |
|00001580| 42 59 54 45 20 62 5b 34 | 5d 3b 20 73 74 72 75 63 |BYTE b[4|]; struc|
|00001590| 74 20 69 6e 5f 61 64 64 | 72 20 61 64 64 72 65 73 |t in_add|r addres|
|000015a0| 73 3b 20 7d 20 61 3b 0d | 09 61 2e 61 64 64 72 65 |s; } a;.|.a.addre|
|000015b0| 73 73 20 3d 20 61 64 64 | 72 65 73 73 3b 0d 09 70 |ss = add|ress;..p|
|000015c0| 72 69 6e 74 66 28 22 25 | 64 2e 22 2c 20 61 2e 62 |rintf("%|d.", a.b|
|000015d0| 5b 30 5d 29 3b 0d 09 70 | 72 69 6e 74 66 28 22 25 |[0]);..p|rintf("%|
|000015e0| 64 2e 22 2c 20 61 2e 62 | 5b 31 5d 29 3b 0d 09 70 |d.", a.b|[1]);..p|
|000015f0| 72 69 6e 74 66 28 22 25 | 64 2e 22 2c 20 61 2e 62 |rintf("%|d.", a.b|
|00001600| 5b 32 5d 29 3b 0d 09 70 | 72 69 6e 74 66 28 22 25 |[2]);..p|rintf("%|
|00001610| 64 22 20 2c 20 61 2e 62 | 5b 33 5d 29 3b 0d 09 7d |d" , a.b|[3]);..}|
|00001620| 0d 0d 69 6e 74 20 6d 61 | 69 6e 28 69 6e 74 20 61 |..int ma|in(int a|
|00001630| 72 67 63 2c 20 63 68 61 | 72 20 2a 2a 61 72 67 76 |rgc, cha|r **argv|
|00001640| 29 0d 09 7b 0d 09 69 6e | 74 20 73 3b 0d 09 73 74 |)..{..in|t s;..st|
|00001650| 72 75 63 74 20 73 6f 63 | 6b 61 64 64 72 5f 69 6e |ruct soc|kaddr_in|
|00001660| 20 6c 63 6c 61 64 64 72 | 3b 0d 09 75 5f 73 68 6f | lcladdr|;..u_sho|
|00001670| 72 74 20 6c 6f 63 61 6c | 70 6f 72 74 20 3d 20 30 |rt local|port = 0|
|00001680| 3b 0d 0d 20 20 20 09 69 | 66 20 28 61 72 67 63 20 |;.. .i|f (argc |
|00001690| 21 3d 20 32 20 26 26 20 | 61 72 67 63 20 21 3d 20 |!= 2 && |argc != |
|000016a0| 33 29 0d 09 09 7b 0d 09 | 09 66 70 72 69 6e 74 66 |3)...{..|.fprintf|
|000016b0| 28 73 74 64 65 72 72 2c | 20 22 55 73 61 67 65 3a |(stderr,| "Usage:|
|000016c0| 20 25 73 20 3c 6c 6f 63 | 61 6c 20 70 6f 72 74 3e | %s <loc|al port>|
|000016d0| 5c 6e 22 2c 20 61 72 67 | 76 5b 30 5d 29 3b 0d 09 |\n", arg|v[0]);..|
|000016e0| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|000016f0| 20 22 55 73 61 67 65 3a | 20 25 73 20 3c 72 65 6d | "Usage:| %s <rem|
|00001700| 6f 74 65 20 70 6f 72 74 | 3e 20 3c 72 65 6d 6f 74 |ote port|> <remot|
|00001710| 65 20 6d 61 63 68 69 6e | 65 3e 5c 6e 22 2c 20 61 |e machin|e>\n", a|
|00001720| 72 67 76 5b 30 5d 29 3b | 0d 09 09 65 78 69 74 28 |rgv[0]);|...exit(|
|00001730| 31 29 3b 0d 09 09 7d 0d | 0d 09 2f 2a 20 4f 70 65 |1);...}.|../* Ope|
|00001740| 6e 20 73 6f 63 6b 65 74 | 20 2a 2f 0d 09 73 20 3d |n socket| */..s =|
|00001750| 20 73 6f 63 6b 65 74 28 | 41 46 5f 49 4e 45 54 2c | socket(|AF_INET,|
|00001760| 20 53 4f 43 4b 5f 44 47 | 52 41 4d 2c 20 49 50 50 | SOCK_DG|RAM, IPP|
|00001770| 52 4f 54 4f 5f 55 44 50 | 29 3b 0d 09 69 66 20 28 |ROTO_UDP|);..if (|
|00001780| 73 20 3c 20 30 29 20 7b | 20 70 65 72 72 6f 72 28 |s < 0) {| perror(|
|00001790| 22 73 6f 63 6b 65 74 22 | 29 3b 20 65 78 69 74 28 |"socket"|); exit(|
|000017a0| 31 29 3b 20 7d 0d 0d 09 | 2f 2a 20 42 69 6e 64 20 |1); }...|/* Bind |
|000017b0| 73 6f 63 6b 65 74 20 74 | 6f 20 6c 6f 63 61 6c 20 |socket t|o local |
|000017c0| 55 44 50 20 70 6f 72 74 | 20 6e 75 6d 62 65 72 20 |UDP port| number |
|000017d0| 2a 2f 0d 09 6c 63 6c 61 | 64 64 72 2e 73 69 6e 5f |*/..lcla|ddr.sin_|
|000017e0| 66 61 6d 69 6c 79 20 20 | 20 20 20 20 3d 20 41 46 |family | = AF|
|000017f0| 5f 49 4e 45 54 3b 0d 09 | 69 66 20 28 61 72 67 63 |_INET;..|if (argc|
|00001800| 3d 3d 32 29 20 6c 63 6c | 61 64 64 72 2e 73 69 6e |==2) lcl|addr.sin|
|00001810| 5f 70 6f 72 74 20 3d 20 | 68 74 6f 6e 73 28 61 74 |_port = |htons(at|
|00001820| 6f 69 28 61 72 67 76 5b | 31 5d 29 29 3b 0d 09 65 |oi(argv[|1]));..e|
|00001830| 6c 73 65 20 20 20 20 20 | 20 20 20 20 6c 63 6c 61 |lse | lcla|
|00001840| 64 64 72 2e 73 69 6e 5f | 70 6f 72 74 20 3d 20 30 |ddr.sin_|port = 0|
|00001850| 3b 0d 09 6c 63 6c 61 64 | 64 72 2e 73 69 6e 5f 61 |;..lclad|dr.sin_a|
|00001860| 64 64 72 2e 73 5f 61 64 | 64 72 20 3d 20 49 4e 41 |ddr.s_ad|dr = INA|
|00001870| 44 44 52 5f 41 4e 59 3b | 0d 09 69 66 20 28 62 69 |DDR_ANY;|..if (bi|
|00001880| 6e 64 28 73 2c 20 28 73 | 74 72 75 63 74 20 73 6f |nd(s, (s|truct so|
|00001890| 63 6b 61 64 64 72 20 2a | 29 26 6c 63 6c 61 64 64 |ckaddr *|)&lcladd|
|000018a0| 72 2c 20 73 69 7a 65 6f | 66 28 6c 63 6c 61 64 64 |r, sizeo|f(lcladd|
|000018b0| 72 29 29 20 3c 20 30 29 | 20 7b 20 70 65 72 72 6f |r)) < 0)| { perro|
|000018c0| 72 28 22 62 69 6e 64 22 | 29 3b 20 65 78 69 74 28 |r("bind"|); exit(|
|000018d0| 31 29 3b 20 7d 0d 09 69 | 66 20 28 61 72 67 63 3d |1); }..i|f (argc=|
|000018e0| 3d 33 29 20 73 65 6e 64 | 71 75 65 72 79 28 73 2c |=3) send|query(s,|
|000018f0| 20 61 72 67 76 29 3b 0d | 0d 09 2f 2a 20 52 65 63 | argv);.|../* Rec|
|00001900| 65 69 76 65 20 74 68 65 | 20 64 61 74 61 20 2a 2f |eive the| data */|
|00001910| 0d 09 77 68 69 6c 65 28 | 31 29 0d 09 09 7b 0d 09 |..while(|1)...{..|
|00001920| 09 74 69 6d 65 5f 74 20 | 74 69 6d 65 6e 6f 77 2c |.time_t |timenow,|
|00001930| 20 67 61 6d 65 74 69 6d | 65 3b 0d 09 09 63 68 61 | gametim|e;...cha|
|00001940| 72 20 2a 74 69 6d 65 73 | 74 72 69 6e 67 2c 20 2a |r *times|tring, *|
|00001950| 70 74 72 3b 0d 09 09 49 | 4e 46 4f 5f 50 41 43 4b |ptr;...I|NFO_PACK|
|00001960| 45 54 20 69 6e 66 6f 3b | 0d 09 09 73 74 72 75 63 |ET info;|...struc|
|00001970| 74 20 73 6f 63 6b 61 64 | 64 72 5f 69 6e 20 66 72 |t sockad|dr_in fr|
|00001980| 6f 6d 3b 0d 09 09 69 6e | 74 20 66 72 6f 6d 6c 65 |om;...in|t fromle|
|00001990| 6e 20 3d 20 73 69 7a 65 | 6f 66 28 66 72 6f 6d 29 |n = size|of(from)|
|000019a0| 3b 0d 09 09 69 6e 74 20 | 70 61 63 6b 65 74 6c 65 |;...int |packetle|
|000019b0| 6e 20 3d 20 72 65 63 76 | 66 72 6f 6d 28 73 2c 20 |n = recv|from(s, |
|000019c0| 26 69 6e 66 6f 2c 20 73 | 69 7a 65 6f 66 28 69 6e |&info, s|izeof(in|
|000019d0| 66 6f 29 2c 20 30 2c 20 | 28 73 74 72 75 63 74 20 |fo), 0, |(struct |
|000019e0| 73 6f 63 6b 61 64 64 72 | 20 2a 29 26 66 72 6f 6d |sockaddr| *)&from|
|000019f0| 2c 20 26 66 72 6f 6d 6c | 65 6e 29 3b 0d 09 09 69 |, &froml|en);...i|
|00001a00| 66 20 28 70 61 63 6b 65 | 74 6c 65 6e 20 21 3d 20 |f (packe|tlen != |
|00001a10| 73 69 7a 65 6f 66 28 69 | 6e 66 6f 29 29 20 63 6f |sizeof(i|nfo)) co|
|00001a20| 6e 74 69 6e 75 65 3b 0d | 09 09 69 66 20 28 69 6e |ntinue;.|..if (in|
|00001a30| 66 6f 2e 68 2e 73 69 67 | 6e 61 74 75 72 65 5b 30 |fo.h.sig|nature[0|
|00001a40| 5d 20 20 20 20 21 3d 20 | 27 42 27 20 20 7c 7c 0d |] != |'B' ||.|
|00001a50| 09 09 20 20 20 20 69 6e | 66 6f 2e 68 2e 73 69 67 |.. in|fo.h.sig|
|00001a60| 6e 61 74 75 72 65 5b 31 | 5d 20 20 20 20 21 3d 20 |nature[1|] != |
|00001a70| 27 6f 27 20 20 7c 7c 0d | 09 09 20 20 20 20 69 6e |'o' ||.|.. in|
|00001a80| 66 6f 2e 68 2e 73 69 67 | 6e 61 74 75 72 65 5b 32 |fo.h.sig|nature[2|
|00001a90| 5d 20 20 20 20 21 3d 20 | 27 6c 27 20 20 7c 7c 0d |] != |'l' ||.|
|00001aa0| 09 09 20 20 20 20 69 6e | 66 6f 2e 68 2e 73 69 67 |.. in|fo.h.sig|
|00001ab0| 6e 61 74 75 72 65 5b 33 | 5d 20 20 20 20 21 3d 20 |nature[3|] != |
|00001ac0| 27 6f 27 20 20 7c 7c 0d | 09 09 20 20 20 20 69 6e |'o' ||.|.. in|
|00001ad0| 66 6f 2e 68 2e 76 65 72 | 73 69 6f 6e 4d 61 6a 6f |fo.h.ver|sionMajo|
|00001ae0| 72 20 20 20 20 21 3d 20 | 42 6f 6c 6f 56 65 72 73 |r != |BoloVers|
|00001af0| 69 6f 6e 5f 4d 61 6a 6f | 72 20 20 20 20 7c 7c 0d |ion_Majo|r ||.|
|00001b00| 09 09 20 20 20 20 69 6e | 66 6f 2e 68 2e 76 65 72 |.. in|fo.h.ver|
|00001b10| 73 69 6f 6e 4d 69 6e 6f | 72 20 20 20 20 21 3d 20 |sionMino|r != |
|00001b20| 42 6f 6c 6f 56 65 72 73 | 69 6f 6e 5f 4d 69 6e 6f |BoloVers|ion_Mino|
|00001b30| 72 20 20 20 20 7c 7c 0d | 09 09 20 20 20 20 69 6e |r ||.|.. in|
|00001b40| 66 6f 2e 68 2e 74 79 70 | 65 20 20 20 20 20 20 20 |fo.h.typ|e |
|00001b50| 20 20 20 20 20 21 3d 20 | 42 6f 6c 6f 50 61 63 6b | != |BoloPack|
|00001b60| 65 74 5f 52 65 73 70 6f | 6e 73 65 20 20 20 29 20 |et_Respo|nse ) |
|00001b70| 63 6f 6e 74 69 6e 75 65 | 3b 0d 09 09 0d 09 09 50 |continue|;......P|
|00001b80| 74 6f 43 53 74 72 28 69 | 6e 66 6f 2e 6d 61 70 6e |toCStr(i|nfo.mapn|
|00001b90| 61 6d 65 2e 63 29 3b 0d | 09 09 69 6e 66 6f 2e 6e |ame.c);.|..info.n|
|00001ba0| 75 6d 5f 70 6c 61 79 65 | 72 73 20 3d 20 6e 65 74 |um_playe|rs = net|
|00001bb0| 73 68 6f 72 74 28 69 6e | 66 6f 2e 6e 75 6d 5f 70 |short(in|fo.num_p|
|00001bc0| 6c 61 79 65 72 73 29 3b | 0d 09 09 69 6e 66 6f 2e |layers);|...info.|
|00001bd0| 66 72 65 65 5f 70 69 6c | 6c 73 20 20 3d 20 6e 65 |free_pil|ls = ne|
|00001be0| 74 73 68 6f 72 74 28 69 | 6e 66 6f 2e 66 72 65 65 |tshort(i|nfo.free|
|00001bf0| 5f 70 69 6c 6c 73 29 3b | 0d 09 09 69 6e 66 6f 2e |_pills);|...info.|
|00001c00| 66 72 65 65 5f 62 61 73 | 65 73 20 20 3d 20 6e 65 |free_bas|es = ne|
|00001c10| 74 73 68 6f 72 74 28 69 | 6e 66 6f 2e 66 72 65 65 |tshort(i|nfo.free|
|00001c20| 5f 62 61 73 65 73 29 3b | 0d 09 09 74 69 6d 65 28 |_bases);|...time(|
|00001c30| 26 74 69 6d 65 6e 6f 77 | 29 3b 0d 09 09 67 61 6d |&timenow|);...gam|
|00001c40| 65 74 69 6d 65 20 3d 20 | 6e 74 6f 68 6c 28 69 6e |etime = |ntohl(in|
|00001c50| 66 6f 2e 67 61 6d 65 69 | 64 2e 73 74 61 72 74 5f |fo.gamei|d.start_|
|00001c60| 74 69 6d 65 29 20 2d 20 | 54 49 4d 45 5f 41 44 4a |time) - |TIME_ADJ|
|00001c70| 55 53 54 3b 0d 0d 09 09 | 70 72 69 6e 74 66 28 22 |UST;....|printf("|
|00001c80| 25 73 22 2c 20 63 74 69 | 6d 65 28 26 74 69 6d 65 |%s", cti|me(&time|
|00001c90| 6e 6f 77 29 29 3b 0d 0d | 20 20 20 20 20 20 20 09 |now));..| .|
|00001ca0| 09 70 72 69 6e 74 66 28 | 22 42 6f 6c 6f 20 70 6c |.printf(|"Bolo pl|
|00001cb0| 61 79 65 72 20 61 74 20 | 22 29 3b 0d 09 09 70 72 |ayer at |");...pr|
|00001cc0| 69 6e 74 69 70 28 66 72 | 6f 6d 2e 73 69 6e 5f 61 |intip(fr|om.sin_a|
|00001cd0| 64 64 72 29 3b 0d 09 09 | 70 72 69 6e 74 66 28 22 |ddr);...|printf("|
|00001ce0| 20 6f 6e 20 6d 61 70 20 | 5c 22 25 73 5c 22 20 72 | on map |\"%s\" r|
|00001cf0| 75 6e 6e 69 6e 67 20 73 | 69 6e 63 65 5c 6e 22 2c |unning s|ince\n",|
|00001d00| 20 69 6e 66 6f 2e 6d 61 | 70 6e 61 6d 65 2e 63 29 | info.ma|pname.c)|
|00001d10| 3b 0d 0d 09 09 70 74 72 | 20 3d 20 74 69 6d 65 73 |;....ptr| = times|
|00001d20| 74 72 69 6e 67 20 3d 20 | 61 73 63 74 69 6d 65 28 |tring = |asctime(|
|00001d30| 67 6d 74 69 6d 65 28 26 | 67 61 6d 65 74 69 6d 65 |gmtime(&|gametime|
|00001d40| 29 29 3b 0d 09 09 77 68 | 69 6c 65 20 28 2a 70 74 |));...wh|ile (*pt|
|00001d50| 72 20 26 26 20 2a 70 74 | 72 20 21 3d 20 27 5c 6e |r && *pt|r != '\n|
|00001d60| 27 29 20 70 74 72 2b 2b | 3b 0d 09 09 2a 70 74 72 |') ptr++|;...*ptr|
|00001d70| 20 3d 20 30 3b 0d 09 09 | 70 72 69 6e 74 66 28 22 | = 0;...|printf("|
|00001d80| 25 73 22 2c 20 74 69 6d | 65 73 74 72 69 6e 67 29 |%s", tim|estring)|
|00001d90| 3b 0d 09 09 69 66 20 28 | 69 6e 66 6f 2e 68 2e 76 |;...if (|info.h.v|
|00001da0| 65 72 73 69 6f 6e 52 65 | 76 69 73 69 6f 6e 20 3c |ersionRe|vision <|
|00001db0| 20 35 29 20 70 72 69 6e | 74 66 28 22 20 28 6c 6f | 5) prin|tf(" (lo|
|00001dc0| 63 61 6c 20 74 69 6d 65 | 20 66 6f 72 20 4d 61 63 |cal time| for Mac|
|00001dd0| 20 61 74 20 22 29 3b 0d | 09 09 65 6c 73 65 20 70 | at ");.|..else p|
|00001de0| 72 69 6e 74 66 28 22 20 | 47 4d 54 20 28 53 74 61 |rintf(" |GMT (Sta|
|00001df0| 72 74 65 64 20 62 79 20 | 4d 61 63 20 61 74 20 22 |rted by |Mac at "|
|00001e00| 29 3b 0d 09 09 70 72 69 | 6e 74 69 70 28 69 6e 66 |);...pri|ntip(inf|
|00001e10| 6f 2e 67 61 6d 65 69 64 | 2e 66 69 72 73 74 6d 61 |o.gameid|.firstma|
|00001e20| 63 68 69 6e 65 29 3b 0d | 09 09 70 72 69 6e 74 66 |chine);.|..printf|
|00001e30| 28 22 29 5c 6e 22 29 3b | 0d 0d 09 09 70 72 69 6e |(")\n");|....prin|
|00001e40| 74 66 28 22 4f 70 74 69 | 6f 6e 73 3a 20 22 29 3b |tf("Opti|ons: ");|
|00001e50| 0d 09 09 73 77 69 74 63 | 68 28 69 6e 66 6f 2e 67 |...switc|h(info.g|
|00001e60| 61 6d 65 74 79 70 65 29 | 0d 09 09 09 7b 0d 09 09 |ametype)|....{...|
|00001e70| 09 63 61 73 65 20 31 3a | 20 70 72 69 6e 74 66 28 |.case 1:| printf(|
|00001e80| 22 4f 70 65 6e 20 47 61 | 6d 65 22 29 3b 20 62 72 |"Open Ga|me"); br|
|00001e90| 65 61 6b 3b 0d 09 09 09 | 63 61 73 65 20 32 3a 20 |eak;....|case 2: |
|00001ea0| 70 72 69 6e 74 66 28 22 | 54 6f 75 72 6e 61 6d 65 |printf("|Tourname|
|00001eb0| 6e 74 22 29 3b 20 62 72 | 65 61 6b 3b 0d 09 09 09 |nt"); br|eak;....|
|00001ec0| 63 61 73 65 20 33 3a 20 | 70 72 69 6e 74 66 28 22 |case 3: |printf("|
|00001ed0| 53 74 72 69 63 74 20 54 | 6f 75 72 6e 61 6d 65 6e |Strict T|ournamen|
|00001ee0| 74 22 29 3b 20 62 72 65 | 61 6b 3b 0d 09 09 09 7d |t"); bre|ak;....}|
|00001ef0| 0d 09 09 69 66 20 28 69 | 6e 66 6f 2e 61 6c 6c 6f |...if (i|nfo.allo|
|00001f00| 77 5f 6d 69 6e 65 73 20 | 3d 3d 20 30 78 38 30 29 |w_mines |== 0x80)|
|00001f10| 20 70 72 69 6e 74 66 28 | 22 2c 20 48 69 64 64 65 | printf(|", Hidde|
|00001f20| 6e 20 6d 69 6e 65 73 22 | 29 3b 0d 09 09 69 66 20 |n mines"|);...if |
|00001f30| 28 69 6e 66 6f 2e 61 6c | 6c 6f 77 5f 41 49 29 20 |(info.al|low_AI) |
|00001f40| 70 72 69 6e 74 66 28 22 | 2c 20 41 49 20 74 61 6e |printf("|, AI tan|
|00001f50| 6b 73 20 61 6c 6c 6f 77 | 65 64 22 29 3b 0d 09 09 |ks allow|ed");...|
|00001f60| 69 66 20 28 69 6e 66 6f | 2e 68 61 73 5f 70 61 73 |if (info|.has_pas|
|00001f70| 73 77 6f 72 64 29 20 70 | 72 69 6e 74 66 28 22 2c |sword) p|rintf(",|
|00001f80| 20 50 61 73 73 77 6f 72 | 64 20 73 65 74 22 29 3b | Passwor|d set");|
|00001f90| 0d 09 09 70 72 69 6e 74 | 66 28 22 5c 6e 50 6c 61 |...print|f("\nPla|
|00001fa0| 79 65 72 73 20 69 6e 20 | 67 61 6d 65 3a 25 32 64 |yers in |game:%2d|
|00001fb0| 2c 20 4e 65 75 74 72 61 | 6c 20 70 69 6c 6c 62 6f |, Neutra|l pillbo|
|00001fc0| 78 65 73 3a 25 32 64 2c | 20 4e 65 75 74 72 61 6c |xes:%2d,| Neutral|
|00001fd0| 20 52 65 66 75 65 6c 69 | 6e 67 20 42 61 73 65 73 | Refueli|ng Bases|
|00001fe0| 3a 25 32 64 5c 6e 5c 6e | 22 2c 20 69 6e 66 6f 2e |:%2d\n\n|", info.|
|00001ff0| 6e 75 6d 5f 70 6c 61 79 | 65 72 73 2c 20 69 6e 66 |num_play|ers, inf|
|00002000| 6f 2e 66 72 65 65 5f 70 | 69 6c 6c 73 2c 20 69 6e |o.free_p|ills, in|
|00002010| 66 6f 2e 66 72 65 65 5f | 62 61 73 65 73 29 3b 0d |fo.free_|bases);.|
|00002020| 09 09 66 66 6c 75 73 68 | 28 73 74 64 6f 75 74 29 |..fflush|(stdout)|
|00002030| 3b 0d 09 09 7d 0d 09 7d | 0d 00 00 00 00 00 00 00 |;...}..}|........|
|00002040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002080| 00 00 01 00 00 00 01 66 | 00 00 00 66 00 00 00 46 |.......f|...f...F|
|00002090| 4f 49 4e 52 45 51 3b 0d | 74 79 70 65 64 65 66 20 |OINREQ;.|typedef |
|000020a0| 73 74 72 75 63 74 20 7b | 20 4e 65 74 41 64 64 72 |struct {| NetAddr|
|000020b0| 10 42 6f 6c 6f 49 6e 66 | 6f 50 61 63 6b 65 74 2e |.BoloInf|oPacket.|
|000020c0| 63 6c 02 00 00 00 50 61 | 72 74 53 49 54 78 00 00 |cl....Pa|rtSITx..|
|000020d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000020e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020f0| 00 00 ab e6 5a 8e 00 00 | 00 00 00 00 01 ac 66 6f |....Z...|......fo|
|00002100| 3b 0d 09 57 4f 52 44 20 | 6e 75 6d 5f 70 6c 61 79 |;..WORD |num_play|
|00002110| 65 72 73 3b 0d 09 57 4f | 52 44 20 66 72 65 65 5f |ers;..WO|RD free_|
|00002120| 70 69 6c 6c 73 3b 0d 09 | 57 4f 52 44 20 66 72 65 |pills;..|WORD fre|
|00002130| 65 5f 62 61 73 65 73 3b | 0d 09 42 59 54 45 20 68 |e_bases;|..BYTE h|
|00002140| 61 73 5f 70 61 73 73 77 | 6f 72 64 3b 0d 09 42 59 |as_passw|ord;..BY|
|00002150| 54 45 20 73 70 61 72 65 | 3b 0d 09 7d 20 50 4b 54 |TE spare|;..} PKT|
|00002160| 5f 49 4e 46 4f 3b 0d 0d | 74 79 70 65 64 65 66 20 |_INFO;..|typedef |
|00002170| 73 74 72 75 63 74 0d 09 | 7b 0d 09 42 4f 4c 4f 48 |struct..|{..BOLOH|
|00002180| 00 00 00 16 00 01 00 00 | 00 00 00 10 00 0c 00 01 |........|........|
|00002190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 48 00 09 |........|.....H..|
|000021a0| 4d 6f 6e 61 63 6f 00 00 | 00 00 00 00 00 00 00 00 |Monaco..|........|
|000021b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021c0| 00 06 00 08 00 2a 00 18 | 01 dd 02 7d 00 1c 02 b3 |.....*..|...}....|
|000021d0| 03 66 05 1a ab c1 f3 f0 | 00 00 1d 68 00 00 1d 68 |.f......|...h...h|
|000021e0| 00 00 00 00 00 00 00 00 | 01 00 00 00 01 66 00 00 |........|.....f..|
|000021f0| 00 66 00 00 00 46 00 d1 | 8d a8 20 b0 00 00 00 1c |.f...F..|.. .....|
|00002200| 00 46 00 01 73 74 79 6c | 00 00 00 12 4d 50 53 52 |.F..styl|....MPSR|
|00002210| 00 00 00 1e 00 80 ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00002220| 03 ed ff ff 00 00 00 1a | 00 c2 63 d4 00 00 00 00 |........|..c.....|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+